package com.ecoolex.discount.sales.ws;

import org.apache.dubbo.config.annotation.Service;
import org.springframework.beans.factory.annotation.Autowired;

import com.ecoolex.discount.sales.core.manager.MarketingBrandManager;
import com.ecoolex.discount.sales.core.manager.MarketingClassifyBrandManager;
import com.ecoolex.discount.sales.core.manager.MarketingClassifyManager;
import com.ecoolex.discount.sales.core.manager.MarketingProductManager;
import com.ecoolex.discount.sales.entity.MarketingBrand;
import com.ecoolex.discount.sales.entity.MarketingClassify;
import com.ecoolex.discount.sales.entity.MarketingClassifyBrand;
import com.ecoolex.discount.sales.entity.MarketingProduct;
import com.ecoolex.discount.sales.pojo.DiscountclassifyInfoDTO;
import com.ecoolex.discount.sales.pojo.QueryMarketingBrandDTO;
import com.ecoolex.discount.sales.pojo.QueryMarketingClassifyBrandDTO;
import com.ecoolex.discount.sales.pojo.QueryMarketingClassifyDTO;
import com.ecoolex.discount.sales.pojo.QueryMarketingProductDTO;
import com.ecoolex.framework.common.exception.BizException;
import com.ecoolex.framework.common.pojo.Page;
import com.ecoolex.framework.common.pojo.Pagination;
import com.ecoolex.framework.common.pojo.Sorting;

@Service
public class MarketingProductServiceImpl implements MarketingProductService{
	
	@Autowired
	private MarketingClassifyManager marketingClassifyManager;

	@Override
	public MarketingClassify addMarketingClassify(MarketingClassify record, String createUser) throws BizException{
		return marketingClassifyManager.addMarketingClassify(record, createUser);
	}

	@Override
	public MarketingClassify editMarketingClassify(MarketingClassify record, String updateUser) throws BizException{
		return marketingClassifyManager.editMarketingClassify(record, updateUser);
	}

	@Override
	public void deleteMarketingClassify(MarketingClassify record, String updateUser) throws BizException{
		marketingClassifyManager.deleteMarketingClassify(record, updateUser);
	}

	@Override
	public MarketingClassify getMarketingClassify(Integer id) {
		return marketingClassifyManager.getMarketingClassify(id);
	}

	@Override
	public Pagination<MarketingClassify> queryMarketingClassify(QueryMarketingClassifyDTO query,Sorting[] sorts, Page page) {
		return marketingClassifyManager.queryMarketingClassify(query,sorts, page);
	}
	
	@Override
	public Pagination<DiscountclassifyInfoDTO> queryMarketingClassifyForH5(QueryMarketingClassifyDTO query,Page page) {
		return marketingClassifyManager.queryMarketingClassifyForH5(query, page);
	}
	
	@Autowired
	private MarketingBrandManager marketingBrandManager;

	@Override
	public MarketingBrand addMarketingBrand(MarketingBrand record, String createUser) throws BizException {
		return marketingBrandManager.addMarketingBrand(record, createUser);
	}

	@Override
	public MarketingBrand editMarketingBrand(MarketingBrand record, String updateUser) throws BizException {
		return marketingBrandManager.editMarketingBrand(record, updateUser);
	}

	@Override
	public void deleteMarketingBrand(MarketingBrand record, String updateUser) throws BizException {
		marketingBrandManager.deleteMarketingBrand(record, updateUser);
	}

	@Override
	public MarketingBrand getMarketingBrand(Integer id) {
		return marketingBrandManager.getMarketingBrand(id);
	}

	@Override
	public Pagination<MarketingBrand> queryMarketingBrand(QueryMarketingBrandDTO query,Sorting[] sorts, Page page) {
		return marketingBrandManager.queryMarketingBrand(query,sorts, page);
	}
	
	@Override
	public Pagination<MarketingBrand> queryMarketingBrandForH5(QueryMarketingBrandDTO query, Page page) {
		return marketingBrandManager.queryMarketingBrandForH5(query, page);
	}
	
	@Autowired
	private MarketingClassifyBrandManager marketingClassifyBrandManager;

	@Override
	public MarketingClassifyBrand addMarketingClassifyBrand(MarketingClassifyBrand record, String createUser) throws BizException {
		return marketingClassifyBrandManager.addMarketingClassifyBrand(record, createUser);
	}

	@Override
	public MarketingClassifyBrand editMarketingClassifyBrand(MarketingClassifyBrand record, String updateUser) throws BizException {
		return marketingClassifyBrandManager.editMarketingClassifyBrand(record, updateUser);
	}

	@Override
	public void deleteMarketingClassifyBrand(MarketingClassifyBrand record, String updateUser) throws BizException {
		marketingClassifyBrandManager.deleteMarketingClassifyBrand(record, updateUser);
	}

	@Override
	public MarketingClassifyBrand getMarketingClassifyBrand(Integer id) {
		return marketingClassifyBrandManager.getMarketingClassifyBrand(id);
	}

	@Override
	public Pagination<MarketingClassifyBrand> queryMarketingClassifyBrand(QueryMarketingClassifyBrandDTO query,Sorting[] sorts, Page page) {
		return marketingClassifyBrandManager.queryMarketingClassifyBrand(query,sorts, page);
	}
	
	@Override
	public Pagination<MarketingClassifyBrand> queryMarketingClassifyBrandForH5(QueryMarketingClassifyBrandDTO query,Page page) {
		return marketingClassifyBrandManager.queryMarketingClassifyBrandForH5(query, page);
	}
	
	@Autowired
	private MarketingProductManager marketingProductManager;

	@Override
	public MarketingProduct addMarketingProduct(MarketingProduct record, String createUser) throws BizException {
		return marketingProductManager.addMarketingProduct(record, createUser);
	}

	@Override
	public MarketingProduct editMarketingProduct(MarketingProduct record, String updateUser) throws BizException {
		return marketingProductManager.editMarketingProduct(record, updateUser);
	}

	@Override
	public void deleteMarketingProduct(MarketingProduct record, String updateUser) throws BizException {
		marketingProductManager.deleteMarketingProduct(record, updateUser);
	}

	@Override
	public MarketingProduct getMarketingProduct(Integer id) {
		return marketingProductManager.getMarketingProduct(id);
	}

	@Override
	public Pagination<MarketingProduct> queryMarketingProduct(QueryMarketingProductDTO query,Sorting[] sorts, Page page) {
		return marketingProductManager.queryMarketingProduct(query,sorts, page);
	}

	@Override
	public Pagination<MarketingProduct> queryMarketingProductForH5(QueryMarketingProductDTO query, Page page) {
		return marketingProductManager.queryMarketingProductForH5(query, page);
	}

}
